import React from 'react';
import {useInRouterContext} from 'react-router-dom'

const Demo = () => {
  console.log('Demo：' + useInRouterContext())     // Demo：false
  return (
    <div>Demo</div>
  );
};

export default Demo;